.class public final Llt/noframe/ratemeplease/RateMePlsKotlin;
.super Ljava/lang/Object;
.source "RateMePlsKotlin.kt"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Llt/noframe/ratemeplease/RateMePlsKotlin$S;
    }
.end annotation

.annotation system Ldalvik/annotation/SourceDebugExtension;
    value = "SMAP\nRateMePlsKotlin.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RateMePlsKotlin.kt\nlt/noframe/ratemeplease/RateMePlsKotlin\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,104:1\n1582#2,2:105\n*E\n*S KotlinDebug\n*F\n+ 1 RateMePlsKotlin.kt\nlt/noframe/ratemeplease/RateMePlsKotlin\n*L\n95#1,2:105\n*E\n"
.end annotation


# static fields
.field public static final S:Llt/noframe/ratemeplease/RateMePlsKotlin$S;

.field private static parentInterface:Llt/noframe/ratemeplease/java_interfaces/OnReactionInterface;


# direct methods
.method static constructor <clinit>()V
    .locals 2

    new-instance v0, Llt/noframe/ratemeplease/RateMePlsKotlin$S;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Llt/noframe/ratemeplease/RateMePlsKotlin$S;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V

    sput-object v0, Llt/noframe/ratemeplease/RateMePlsKotlin;->S:Llt/noframe/ratemeplease/RateMePlsKotlin$S;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .line 17
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static final synthetic access$getParentInterface$cp()Llt/noframe/ratemeplease/java_interfaces/OnReactionInterface;
    .locals 1

    .line 17
    sget-object v0, Llt/noframe/ratemeplease/RateMePlsKotlin;->parentInterface:Llt/noframe/ratemeplease/java_interfaces/OnReactionInterface;

    return-object v0
.end method

.method public static final synthetic access$getSocialNetwork(Llt/noframe/ratemeplease/RateMePlsKotlin;Landroid/content/Context;)Llt/noframe/ratemeplease/abs/AbsSocialNetwork;
    .locals 0

    .line 17
    invoke-direct {p0, p1}, Llt/noframe/ratemeplease/RateMePlsKotlin;->getSocialNetwork(Landroid/content/Context;)Llt/noframe/ratemeplease/abs/AbsSocialNetwork;

    move-result-object p0

    return-object p0
.end method

.method private final getSocialNetwork(Landroid/content/Context;)Llt/noframe/ratemeplease/abs/AbsSocialNetwork;
    .locals 6

    .line 86
    invoke-static {p1}, Llt/noframe/ratemeplease/utils/UtilsKt;->sp(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    invoke-static {}, Llt/noframe/ratemeplease/TriggersKt;->getKEY_TRIGGER_SHOWN_SET()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Llt/noframe/ratemeplease/utils/UtilsKt;->getSet(Landroid/content/SharedPreferences;Ljava/lang/String;)Ljava/util/Set;

    move-result-object v0

    .line 87
    invoke-static {p1}, Llt/noframe/ratemeplease/utils/UtilsKt;->sp(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    invoke-static {}, Llt/noframe/ratemeplease/TriggersKt;->getKEY_RATING()Ljava/lang/String;

    move-result-object v2

    const/high16 v3, -0x40800000    # -1.0f

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F

    move-result v1

    .line 88
    sget-object v2, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v2}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/ratemeplease/Conf;->getRatingThreshold()F

    move-result v2

    const/4 v4, 0x1

    const/4 v5, 0x0

    cmpl-float v2, v1, v2

    if-lez v2, :cond_0

    const/4 v2, 0x1

    goto :goto_0

    :cond_0
    const/4 v2, 0x0

    :goto_0
    cmpg-float v1, v1, v3

    if-eqz v1, :cond_1

    goto :goto_1

    :cond_1
    const/4 v4, 0x0

    :goto_1
    if-nez v4, :cond_2

    .line 92
    new-instance p1, Llt/noframe/ratemeplease/Networks$PlayStoreNetwork;

    invoke-direct {p1}, Llt/noframe/ratemeplease/Networks$PlayStoreNetwork;-><init>()V

    return-object p1

    .line 95
    :cond_2
    sget-object v1, Llt/noframe/ratemeplease/Networks;->INSTANCE:Llt/noframe/ratemeplease/Networks;

    invoke-virtual {v1}, Llt/noframe/ratemeplease/Networks;->getAVAILABLE()Ljava/util/List;

    move-result-object v1

    .line 105
    invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_3
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_4

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/ratemeplease/abs/AbsSocialNetwork;

    .line 96
    invoke-virtual {v3}, Llt/noframe/ratemeplease/abs/AbsSocialNetwork;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-static {p1, v4}, Llt/noframe/ratemeplease/utils/UtilsKt;->isPackageExists(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_3

    .line 97
    invoke-virtual {v3}, Llt/noframe/ratemeplease/abs/AbsSocialNetwork;->getKey()Ljava/lang/String;

    move-result-object v4

    invoke-interface {v0, v4}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_3

    if-eqz v2, :cond_3

    return-object v3

    :cond_4
    const/4 p1, 0x0

    return-object p1
.end method

.method private final runIfTriggered(Landroid/content/Context;Lkotlin/jvm/functions/Function0;)Z
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Lkotlin/jvm/functions/Function0<",
            "Ljava/lang/Boolean;",
            ">;)Z"
        }
    .end annotation

    .line 79
    sget-object v0, Llt/noframe/ratemeplease/Triggers;->INSTANCE:Llt/noframe/ratemeplease/Triggers;

    invoke-virtual {v0, p1}, Llt/noframe/ratemeplease/Triggers;->isTriggered(Landroid/content/Context;)Z

    move-result p1

    if-eqz p1, :cond_0

    .line 80
    invoke-interface {p2}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    return p1

    :cond_0
    const/4 p1, 0x0

    return p1
.end method


# virtual methods
.method public final init(Landroid/content/Context;Llt/noframe/ratemeplease/Conf;Llt/noframe/ratemeplease/java_interfaces/OnReactionInterface;)V
    .locals 6

    const-string v0, "context"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "conf"

    invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "parentInterface"

    invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 24
    sput-object p3, Llt/noframe/ratemeplease/RateMePlsKotlin;->parentInterface:Llt/noframe/ratemeplease/java_interfaces/OnReactionInterface;

    .line 26
    sget-object p3, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {p3, p2}, Llt/noframe/ratemeplease/Conf$Companion;->setIns(Llt/noframe/ratemeplease/Conf;)V

    .line 28
    sget-object p2, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {p2}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object p2

    invoke-virtual {p2}, Llt/noframe/ratemeplease/Conf;->getFacebookPageId()Ljava/lang/String;

    move-result-object p2

    const/4 p3, 0x0

    if-eqz p2, :cond_4

    .line 29
    sget-object p2, Llt/noframe/ratemeplease/Networks;->INSTANCE:Llt/noframe/ratemeplease/Networks;

    invoke-virtual {p2}, Llt/noframe/ratemeplease/Networks;->getAVAILABLE()Ljava/util/List;

    move-result-object p2

    new-instance v0, Llt/noframe/ratemeplease/Networks$FacebookNetwork;

    new-instance v1, Llt/noframe/ratemeplease/FacebookDialogFragment;

    .line 30
    sget-object v2, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v2}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/ratemeplease/Conf;->getFacebookPageId()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_3

    .line 31
    sget-object v3, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v3}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/ratemeplease/Conf;->getFacebookShareDescription()Ljava/lang/String;

    move-result-object v3

    if-eqz v3, :cond_2

    .line 32
    sget-object v4, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v4}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v4

    invoke-virtual {v4}, Llt/noframe/ratemeplease/Conf;->getFacebookPageName()Ljava/lang/String;

    move-result-object v4

    if-eqz v4, :cond_1

    .line 33
    sget-object v5, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v5}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v5

    invoke-virtual {v5}, Llt/noframe/ratemeplease/Conf;->getFacebookMessageText()Ljava/lang/String;

    move-result-object v5

    if-eqz v5, :cond_0

    .line 29
    invoke-direct {v1, v2, v5, v3, v4}, Llt/noframe/ratemeplease/FacebookDialogFragment;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    invoke-direct {v0, v1}, Llt/noframe/ratemeplease/Networks$FacebookNetwork;-><init>(Llt/noframe/ratemeplease/abs/AbsDialogFragment;)V

    invoke-interface {p2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 33
    :cond_0
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    throw p3

    .line 32
    :cond_1
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    throw p3

    .line 31
    :cond_2
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    throw p3

    .line 30
    :cond_3
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    throw p3

    .line 37
    :cond_4
    :goto_0
    sget-object p2, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {p2}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object p2

    invoke-virtual {p2}, Llt/noframe/ratemeplease/Conf;->getTwitterPageId()Ljava/lang/String;

    move-result-object p2

    if-eqz p2, :cond_8

    .line 38
    sget-object p2, Llt/noframe/ratemeplease/Networks;->INSTANCE:Llt/noframe/ratemeplease/Networks;

    invoke-virtual {p2}, Llt/noframe/ratemeplease/Networks;->getAVAILABLE()Ljava/util/List;

    move-result-object p2

    new-instance v0, Llt/noframe/ratemeplease/Networks$TwitterNetwork;

    new-instance v1, Llt/noframe/ratemeplease/TwitterDialogFragment;

    .line 39
    sget-object v2, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v2}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/ratemeplease/Conf;->getTwitterPageId()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_7

    .line 40
    sget-object v3, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v3}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/ratemeplease/Conf;->getTwitterHashTag()Ljava/lang/String;

    move-result-object v3

    if-eqz v3, :cond_6

    .line 41
    sget-object v4, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v4}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v4

    invoke-virtual {v4}, Llt/noframe/ratemeplease/Conf;->getTwitterTweetMessage()Ljava/lang/String;

    move-result-object v4

    if-eqz v4, :cond_5

    .line 38
    invoke-direct {v1, v2, v3, v4}, Llt/noframe/ratemeplease/TwitterDialogFragment;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    invoke-direct {v0, v1}, Llt/noframe/ratemeplease/Networks$TwitterNetwork;-><init>(Llt/noframe/ratemeplease/abs/AbsDialogFragment;)V

    invoke-interface {p2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 41
    :cond_5
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    throw p3

    .line 40
    :cond_6
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    throw p3

    .line 39
    :cond_7
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    throw p3

    .line 45
    :cond_8
    :goto_1
    sget-object p2, Llt/noframe/ratemeplease/triggers/OpenCountTrigger;->INSTANCE:Llt/noframe/ratemeplease/triggers/OpenCountTrigger;

    invoke-virtual {p2, p1}, Llt/noframe/ratemeplease/triggers/OpenCountTrigger;->add(Landroid/content/Context;)V

    return-void
.end method

.method public final showIfTriggered(Landroidx/fragment/app/FragmentActivity;)Z
    .locals 2

    const-string v0, "activity"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 49
    sget-object v0, Llt/noframe/ratemeplease/Conf;->Companion:Llt/noframe/ratemeplease/Conf$Companion;

    invoke-virtual {v0}, Llt/noframe/ratemeplease/Conf$Companion;->getIns()Llt/noframe/ratemeplease/Conf;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/ratemeplease/Conf;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_0

    .line 50
    const-class p1, Llt/noframe/ratemeplease/RateMePlsKotlin;

    invoke-virtual {p1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object p1

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-class v1, Llt/noframe/ratemeplease/RateMePlsKotlin;

    invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, " is DISABLED."

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {p1, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    const/4 p1, 0x0

    return p1

    .line 54
    :cond_0
    new-instance v0, Llt/noframe/ratemeplease/RateMePlsKotlin$showIfTriggered$1;

    invoke-direct {v0, p0, p1}, Llt/noframe/ratemeplease/RateMePlsKotlin$showIfTriggered$1;-><init>(Llt/noframe/ratemeplease/RateMePlsKotlin;Landroidx/fragment/app/FragmentActivity;)V

    invoke-direct {p0, p1, v0}, Llt/noframe/ratemeplease/RateMePlsKotlin;->runIfTriggered(Landroid/content/Context;Lkotlin/jvm/functions/Function0;)Z

    move-result p1

    return p1
.end method
